#ifndef SKYROAD_XML_PROTOCOL_PARSER_H
#define SKYROAD_XML_PROTOCOL_PARSER_H

#include <skyroad/tinyxml/tinyxml.h>
#include <skyroad/cross_platform/basetype.h>

SKYROAD_DECL  const char* WXmlParser_LoadCommand( TiXmlElement& element,const CHAR* szCommand,int nLength );
SKYROAD_DECL  const char* WXmlParser_GetCommand( TiXmlElement *pElement,WORD& wCommand );
SKYROAD_DECL  bool        WXmlParser_SetCommand( TiXmlElement *pElement,WORD wCommand );
SKYROAD_DECL  const char* WXmlParser_GetVersion( TiXmlElement *pElement );
SKYROAD_DECL  bool        WXmlParser_SetVersion( TiXmlElement *pElement,const CHAR* szVersion );

SKYROAD_DECL  const char* WXmlParser_GetSeqnum( TiXmlElement *pElement,int& nSeqnum );
SKYROAD_DECL  bool        WXmlParser_SetSeqnum( TiXmlElement *pElement,int nSeqnum );

SKYROAD_DECL  const char* WXmlParser_GetFieldValue( TiXmlElement* pElement,const CHAR* szValueName,CHAR* szValue = NULL,DWORD dwSize = 0 );
SKYROAD_DECL  bool        WXmlParser_SetFieldValue( TiXmlElement *pElement,const CHAR* szValueName,const CHAR* szValue );
SKYROAD_DECL  bool        WXmlParser_AddFieldValue( TiXmlElement *pElement,const CHAR* szValueName,const CHAR* szValue );

SKYROAD_DECL  const char* WXmlParser_GetFieldValue( TiXmlElement* pElement,const CHAR* szValueName,WCHAR* wszValue,DWORD dwSize );
SKYROAD_DECL  bool        WXmlParser_SetFieldValue( TiXmlElement *pElement,const CHAR* szValueName,const WCHAR* wszValue );
SKYROAD_DECL  bool        WXmlParser_AddFieldValue( TiXmlElement *pElement,const CHAR* szValueName,const WCHAR* wszValue );

SKYROAD_DECL  const char* WXmlParser_GetFieldValue( TiXmlElement* pElement,const CHAR* szValueName,int& nValue );
SKYROAD_DECL  bool        WXmlParser_SetFieldValue( TiXmlElement *pElement,const CHAR* szValueName,int nValue );
SKYROAD_DECL  bool        WXmlParser_AddFieldValue( TiXmlElement *pElement,const CHAR* szValueName,int nValue );

SKYROAD_DECL  const char* WXmlParser_GetFieldValue( TiXmlElement* pElement,const CHAR* szValueName,GUID& guid );
SKYROAD_DECL  bool        WXmlParser_SetFieldValue( TiXmlElement *pElement,const CHAR* szValueName,const GUID& guid );
SKYROAD_DECL  bool        WXmlParser_AddFieldValue( TiXmlElement *pElement,const CHAR* szValueName,const GUID& guid );

#endif